package elitech.vietnam.weatherfashion.dto;

import java.util.Date;

import com.google.gson.annotations.SerializedName;

import elitech.vietnam.weatherfashion.ultilities.Utilities;

public class LikeDTO {

	private int id;
	@SerializedName("id_mem")
	private int memId;
	@SerializedName("id_post")
	private int postId;
	private int like;
	@SerializedName("datetime")
	private String dateString;
	private Date date;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getMemId() {
		return memId;
	}

	public void setMemId(int memId) {
		this.memId = memId;
	}

	public int getPostId() {
		return postId;
	}

	public void setPostId(int postId) {
		this.postId = postId;
	}

	public int getLike() {
		return like;
	}

	public void setLike(int like) {
		this.like = like;
	}

	public Date getDate() {
		if (date == null)
			date = Utilities.parseDateFromStringFormat(dateString,
					"yyyy-MM-dd hh:mm:ss");
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

}
